/**
 */
package org.mro.grib.model.files.secondEdition.grids;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.common.util.Enumerator;

/**
 * <!-- begin-user-doc -->
 * A representation of the literals of the enumeration '<em><b>Scanning Mode</b></em>',
 * and utility methods for working with them.
 * <!-- end-user-doc -->
 * @see org.mro.grib.model.files.secondEdition.grids.GridsPackage#getScanningMode()
 * @model annotation="http://www.eclipse.org/emf/2002/GenModel description_en='Flag table 3.4 \u2013 Scanning mode' note_1_en='i direction: west to east along a parallel or left to right along an x-axis.' note_2_en='j direction: south to north along a meridian, or bottom to top along a y-axis.' note_3_en='If bit number 4 is set, the first row scan is as defined by previous flags.'"
 * @generated
 */
public enum ScanningMode implements Enumerator {
	/**
	 * The '<em><b>ISCAN DIRECTION</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #ISCAN_DIRECTION_VALUE
	 * @generated
	 * @ordered
	 */
	ISCAN_DIRECTION(1, "I_SCAN_DIRECTION", "I_SCAN_DIRECTION"), //$NON-NLS-1$ //$NON-NLS-2$

	/**
	 * The '<em><b>JSCAN DIRECTION</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #JSCAN_DIRECTION_VALUE
	 * @generated
	 * @ordered
	 */
	JSCAN_DIRECTION(2, "J_SCAN_DIRECTION", "J_SCAN_DIRECTION"), //$NON-NLS-1$ //$NON-NLS-2$

	/**
	 * The '<em><b>CONSECUTIF ADJACENT POINTS DIRECTION</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #CONSECUTIF_ADJACENT_POINTS_DIRECTION_VALUE
	 * @generated
	 * @ordered
	 */
	CONSECUTIF_ADJACENT_POINTS_DIRECTION(3, "CONSECUTIF_ADJACENT_POINTS_DIRECTION", "CONSECUTIF_ADJACENT_POINTS_DIRECTION"), //$NON-NLS-1$ //$NON-NLS-2$

	/**
	 * The '<em><b>ROWS SCAN DIRECTION</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #ROWS_SCAN_DIRECTION_VALUE
	 * @generated
	 * @ordered
	 */
	ROWS_SCAN_DIRECTION(4, "ROWS_SCAN_DIRECTION", "ROWS_SCAN_DIRECTION"); //$NON-NLS-1$ //$NON-NLS-2$

	/**
	 * The '<em><b>ISCAN DIRECTION</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>ISCAN DIRECTION</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #ISCAN_DIRECTION
	 * @model name="I_SCAN_DIRECTION"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel 0_en='Points of first row or column scan in the +i (+x) direction' 1_en='Points of first row or column scan in the \u2013i (\u2013x) direction'"
	 * @generated
	 * @ordered
	 */
	public static final int ISCAN_DIRECTION_VALUE = 1;

	/**
	 * The '<em><b>JSCAN DIRECTION</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>JSCAN DIRECTION</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #JSCAN_DIRECTION
	 * @model name="J_SCAN_DIRECTION"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel 0_en='Points of first row or column scan in the \u2013j (\u2013y) direction' 1_en='Points of first row or column scan in the +j (+y) direction'"
	 * @generated
	 * @ordered
	 */
	public static final int JSCAN_DIRECTION_VALUE = 2;

	/**
	 * The '<em><b>CONSECUTIF ADJACENT POINTS DIRECTION</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>CONSECUTIF ADJACENT POINTS DIRECTION</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #CONSECUTIF_ADJACENT_POINTS_DIRECTION
	 * @model annotation="http://www.eclipse.org/emf/2002/GenModel 0_en='Adjacent points in i (x) direction are consecutive' 1_en='Adjacent points in j (y) direction is consecutive'"
	 * @generated
	 * @ordered
	 */
	public static final int CONSECUTIF_ADJACENT_POINTS_DIRECTION_VALUE = 3;

	/**
	 * The '<em><b>ROWS SCAN DIRECTION</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>ROWS SCAN DIRECTION</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #ROWS_SCAN_DIRECTION
	 * @model annotation="http://www.eclipse.org/emf/2002/GenModel 0_en='All rows scan in the same direction' 1_en='Adjacent rows scans in the opposite direction'"
	 * @generated
	 * @ordered
	 */
	public static final int ROWS_SCAN_DIRECTION_VALUE = 4;

	/**
	 * An array of all the '<em><b>Scanning Mode</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static final ScanningMode[] VALUES_ARRAY =
		new ScanningMode[] {
			ISCAN_DIRECTION,
			JSCAN_DIRECTION,
			CONSECUTIF_ADJACENT_POINTS_DIRECTION,
			ROWS_SCAN_DIRECTION,
		};

	/**
	 * A public read-only list of all the '<em><b>Scanning Mode</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final List<ScanningMode> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));

	/**
	 * Returns the '<em><b>Scanning Mode</b></em>' literal with the specified literal value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static ScanningMode get(String literal) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			ScanningMode result = VALUES_ARRAY[i];
			if (result.toString().equals(literal)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Scanning Mode</b></em>' literal with the specified name.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static ScanningMode getByName(String name) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			ScanningMode result = VALUES_ARRAY[i];
			if (result.getName().equals(name)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Scanning Mode</b></em>' literal with the specified integer value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static ScanningMode get(int value) {
		switch (value) {
			case ISCAN_DIRECTION_VALUE: return ISCAN_DIRECTION;
			case JSCAN_DIRECTION_VALUE: return JSCAN_DIRECTION;
			case CONSECUTIF_ADJACENT_POINTS_DIRECTION_VALUE: return CONSECUTIF_ADJACENT_POINTS_DIRECTION;
			case ROWS_SCAN_DIRECTION_VALUE: return ROWS_SCAN_DIRECTION;
		}
		return null;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final int value;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String name;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String literal;

	/**
	 * Only this class can construct instances.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private ScanningMode(int value, String name, String literal) {
		this.value = value;
		this.name = name;
		this.literal = literal;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getValue() {
	  return value;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getName() {
	  return name;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getLiteral() {
	  return literal;
	}

	/**
	 * Returns the literal value of the enumerator, which is its string representation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		return literal;
	}
	
} //ScanningMode
